<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class DateTimeUtils</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class DateTimeUtils</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A utility class to for converting PHP DateTime objects to DFP native objects.</p>
		<p class="notes">
			Located in <a class="field" href="_Ads---Dfp---Util---DateTimeUtils.php.html">/Ads/Dfp/Util/DateTimeUtils.php</a> (line <span class="field">30</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<a href="#DFP_DATE_TIME_STRING_FORMAT" title="details" class="const-name">DFP_DATE_TIME_STRING_FORMAT</a> = 					<span class="var-type"> 'Y-m-d\TH:i:s'</span>

				</div>
							</div>
		</div>
	</div>

	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="var-summary">
												<div class="var-title">
					static <span class="var-type">string</span>
					<a href="#$DFP_DATE_TIME_STRING_FORMAT" title="details" class="var-name">$DFP_DATE_TIME_STRING_FORMAT</a>
				</div>
																							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
												<div class="method-definition">
					static 						<span class="method-result">DateTime</span>
										<a href="#FromDfpDate" title="details" class="method-name">FromDfpDate</a>
											(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/Date.html">Date</a></span>&nbsp;<span class="var-name">$dfpDate</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
					static 						<span class="method-result">DateTime</span>
										<a href="#FromDfpDateTime" title="details" class="method-name">FromDfpDateTime</a>
											(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>&nbsp;<span class="var-name">$dfpDateTime</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
					static 						<span class="method-result">DateTime</span>
										<a href="#GetDateTime" title="details" class="method-name">GetDateTime</a>
											(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>&nbsp;<span class="var-name">$dfpDateTime</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
					static 						<span class="method-result"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
										<a href="#GetDfpDateTime" title="details" class="method-name">GetDfpDateTime</a>
											(<span class="var-type">DateTime</span>&nbsp;<span class="var-name">$dateTime</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result"><a href="../../GoogleApiAdsDfp/v201211/Date.html">Date</a></span>
										<a href="#ToDfpDate" title="details" class="method-name">ToDfpDate</a>
											(<span class="var-type">DateTime</span>&nbsp;<span class="var-name">$dateTime</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
										<a href="#ToDfpDateTime" title="details" class="method-name">ToDfpDateTime</a>
											(<span class="var-type">DateTime</span>&nbsp;<span class="var-name">$dateTime</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#ToDfpDateTimeString" title="details" class="method-name">ToDfpDateTimeString</a>
											(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>&nbsp;<span class="var-name">$dfpDateTime</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
									</div>
								
																																																												</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$DFP_DATE_TIME_STRING_FORMAT" id="$DFP_DATE_TIME_STRING_FORMAT"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			static <span class="var-type">string</span>
			<span class="var-name">$DFP_DATE_TIME_STRING_FORMAT</span>
			 = <span class="var-default"> 'Y-m-d\TH:i:s'</span>			(line <span class="line-number">38</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Format string used to format a DateTime for use with DFP PQL.</p>
	<ul class="tags">
				<li><span class="field">deprecated:</span> use the const DateTimeUtils::DFP_DATE_TIME_STRING_FORMAT      instead</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																			<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodFromDfpDate" id="FromDfpDate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method FromDfpDate</span> (line <span class="line-number">132</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a DFP Date to a PHP DateTime.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a PHP DateTime object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">DateTime</span>
		<span class="method-name">
			FromDfpDate
		</span>
					(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/Date.html">Date</a></span>&nbsp;<span class="var-name">$dfpDate</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/Date.html">Date</a></span>
				<span class="var-name">$dfpDate</span><span class="var-description">: a DFP Date object</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$timezone</span>			</li>
				</ul>
		
			
	</div>
<a name="methodFromDfpDateTime" id="FromDfpDateTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method FromDfpDateTime</span> (line <span class="line-number">97</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a DfpDateTime to a PHP DateTime.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a PHP DateTime object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">DateTime</span>
		<span class="method-name">
			FromDfpDateTime
		</span>
					(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>&nbsp;<span class="var-name">$dfpDateTime</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
				<span class="var-name">$dfpDateTime</span><span class="var-description">: a DfpDateTime object</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$timezone</span><span class="var-description">: the timezone to use, optional</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGetDateTime" id="GetDateTime"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method GetDateTime</span> (line <span class="line-number">68</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a DfpDateTime to a PHP DateTime.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a PHP DateTime object</li>
				<li><span class="field">deprecated:</span> use FromDfpDateTime() instead</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">DateTime</span>
		<span class="method-name">
			GetDateTime
		</span>
					(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>&nbsp;<span class="var-name">$dfpDateTime</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
				<span class="var-name">$dfpDateTime</span><span class="var-description">: a DfpDateTime object</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$timezone</span><span class="var-description">: the timezone to use, optional</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGetDfpDateTime" id="GetDfpDateTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method GetDfpDateTime</span> (line <span class="line-number">57</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a PHP DateTime to a DfpDateTime.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a DfpDateTime object</li>
				<li><span class="field">deprecated:</span> use ToDfpDateTime() instead</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
		<span class="method-name">
			GetDfpDateTime
		</span>
					(<span class="var-type">DateTime</span>&nbsp;<span class="var-name">$dateTime</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DateTime</span>
				<span class="var-name">$dateTime</span><span class="var-description">: a PHP DateTime object</span>			</li>
				</ul>
		
			
	</div>
<a name="methodToDfpDate" id="ToDfpDate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method ToDfpDate</span> (line <span class="line-number">117</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a PHP DateTime to a DFP Date.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a DFP Date object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result"><a href="../../GoogleApiAdsDfp/v201211/Date.html">Date</a></span>
		<span class="method-name">
			ToDfpDate
		</span>
					(<span class="var-type">DateTime</span>&nbsp;<span class="var-name">$dateTime</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DateTime</span>
				<span class="var-name">$dateTime</span><span class="var-description">: a PHP DateTime object</span>			</li>
				</ul>
		
			
	</div>
<a name="methodToDfpDateTime" id="ToDfpDateTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method ToDfpDateTime</span> (line <span class="line-number">78</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a PHP DateTime to a DfpDateTime.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a DfpDateTime object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
		<span class="method-name">
			ToDfpDateTime
		</span>
					(<span class="var-type">DateTime</span>&nbsp;<span class="var-name">$dateTime</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DateTime</span>
				<span class="var-name">$dateTime</span><span class="var-description">: a PHP DateTime object</span>			</li>
				</ul>
		
			
	</div>
<a name="methodToDfpDateTimeString" id="ToDfpDateTimeString"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method ToDfpDateTimeString</span> (line <span class="line-number">147</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a DfpDateTime to a DFP DateTime string.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a DFP DateTime string</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">string</span>
		<span class="method-name">
			ToDfpDateTimeString
		</span>
					(<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>&nbsp;<span class="var-name">$dfpDateTime</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$timezone</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../GoogleApiAdsDfp/v201211/DfpDateTime.html">DfpDateTime</a></span>
				<span class="var-name">$dfpDateTime</span><span class="var-description">: a DfpDateTime object</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$timezone</span><span class="var-description">: timezone the timezone to use, optional</span>			</li>
				</ul>
		
			
	</div>

						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constDFP_DATE_TIME_STRING_FORMAT" id="DFP_DATE_TIME_STRING_FORMAT"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">DFP_DATE_TIME_STRING_FORMAT</span>
			 = <span class="const-default"> 'Y-m-d\TH:i:s'</span>
			(line <span class="line-number">44</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Format string used to format a DateTime for use with DFP PQL.</p>
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>